home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
L' Effet Pommier 3
/
L'Effet Pommier - Volume 03.iso
/
HyperCard-SuperCard
/
reference
/
Reference Frame
/
card_4160.txt
< prev
next >
Wrap
Text File
|
1989-07-09
|
11KB
|
516 lines
-- card: 4160 from stack: in
-- bmap block id: 5798
-- flags: 4000
-- background id: 2889
-- name: format
----- HyperTalk script -----
on openCard
hide menuBar
end openCard
on closeCard
global prefix, wrtNumbers, numberAffix, howMany, order, affix , authorOrder, authorsAffix, nBlankL
set the cursor to 4
put "Title,Authors,Journal,Volume,Number" into cardOrder
put cardOrder & ",Beginning Page,Ending Page,Year" into cardOrder
put empty into prefix
put empty into numberAffix
put "0" into howMany
put empty into order
put empty into affix
put empty into authorOrder
put empty into authorsAffix
put "0" into nBlankL
if card field "prefix" is not empty then
put card field "prefix" into prefix
end if
if card field "# blank lines" is not empty then
put card field "# blank lines" into nBlankL
end if
if wrtNumbers is true then
put card field "number list affix" into numberAffix
end if
repeat with i = 1 to number of items of cardOrder
if card field i is not empty then
put card field i into n
put item i of cardOrder into item n of order
get number of card field i
put card field value(it + 8) into line n of affix
put 1 + howMany into howMany
end if
end repeat
if card field "3-author example" is empty then
answer "the 3-author example field must not be empty"
go to card "format"
exit closeCard
else
put card field "3-author example" into example
put number of characters in example into n
repeat with i = 1 to n
if char i of example is "F" then put "f" into char i of example
if char i of example is "L" then put "l" into char i of example
end repeat
put parseEx(example) into authorOrder
put separaters(example,authorOrder) into authorsAffix
end if
show menuBar
end closeCard
function separaters example, authorOrder
put example into string
put authorOrder into order
put empty into outStr
if char 1 of order is "f" then
delete char 1 to value(offset("first", string) + 4) of string
else
delete char 1 to value(offset("last", string) + 3) of string
end if
delete char 1 of order
repeat with n = 1 to 5
if char n of order is "f" then
put offset("first", string) into head
put head + 4 into tail
else
put offset("last", string) into head
put head + 3 into tail
end if
put char 1 to value(head - 1) of string into line n of outStr
delete char 1 to tail of string
end repeat
return outStr
end separaters
function parseEx example
put example into string
put empty into list
repeat with i = 1 to 3
put offset("first", string) into head
put offset("last", string) into tail
if head > tail then -- reverse order
put list & "lf" into list
delete char 1 to value(head+4) of string
else
put list & "fl" into list
delete char 1 to value(tail+3) of string
end if
end repeat
return list
end parseEx
-- part 1 (button)
-- low flags: 00
-- high flags: A000
-- rect: left=460 top=0 right=51 bottom=510
-- title width / last selected line: 0
-- icon id / first selected line: 27056 / 27056
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Return
----- HyperTalk script -----
on mouseUp
go to card "Options"
end mouseUp
-- part 2 (button)
-- low flags: 00
-- high flags: 8005
-- rect: left=68 top=76 right=98 bottom=177
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Number List?
----- HyperTalk script -----
on mouseUp
global wrtNumbers
get hilite of button "Number List?"
if it is true then
set hilite of button "Number List?" to false
put false into wrtNumbers
else
set hilite of button "Number List?" to true
put true into wrtNumbers
end if
end mouseUp
-- part 5 (field)
-- low flags: 00
-- high flags: 0002
-- rect: left=157 top=104 right=121 bottom=173
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Title
-- part 14 (field)
-- low flags: 00
-- high flags: 0002
-- rect: left=157 top=128 right=145 bottom=173
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Authors
-- part 15 (field)
-- low flags: 00
-- high flags: 0002
-- rect: left=157 top=152 right=169 bottom=173
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Journal
-- part 16 (field)
-- low flags: 00
-- high flags: 0002
-- rect: left=157 top=178 right=195 bottom=173
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Volume
-- part 17 (field)
-- low flags: 00
-- high flags: 0002
-- rect: left=157 top=204 right=221 bottom=173
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Number
-- part 18 (field)
-- low flags: 00
-- high flags: 0002
-- rect: left=157 top=229 right=246 bottom=173
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Beginning Page
-- part 19 (field)
-- low flags: 00
-- high flags: 0002
-- rect: left=157 top=254 right=271 bottom=173
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Ending Page
-- part 20 (field)
-- low flags: 00
-- high flags: 0002
-- rect: left=157 top=279 right=296 bottom=173
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Year
-- part 21 (field)
-- low flags: 00
-- high flags: 0002
-- rect: left=331 top=104 right=121 bottom=433
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: title affix
-- part 22 (field)
-- low flags: 00
-- high flags: 0002
-- rect: left=331 top=129 right=146 bottom=433
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: authors affix
-- part 23 (field)
-- low flags: 00
-- high flags: 0002
-- rect: left=331 top=152 right=169 bottom=433
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: journal affix
-- part 24 (field)
-- low flags: 00
-- high flags: 0002
-- rect: left=331 top=178 right=195 bottom=433
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: volume affix
-- part 25 (field)
-- low flags: 00
-- high flags: 0002
-- rect: left=331 top=204 right=221 bottom=433
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: number affix
-- part 26 (field)
-- low flags: 00
-- high flags: 0002
-- rect: left=331 top=229 right=246 bottom=433
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: begin affix
-- part 27 (field)
-- low flags: 00
-- high flags: 0002
-- rect: left=331 top=254 right=271 bottom=433
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: end affix
-- part 28 (field)
-- low flags: 00
-- high flags: 0002
-- rect: left=331 top=279 right=296 bottom=433
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: year affix
-- part 29 (field)
-- low flags: 00
-- high flags: 0002
-- rect: left=331 top=78 right=95 bottom=433
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: number list affix
-- part 30 (field)
-- low flags: 00
-- high flags: 0002
-- rect: left=156 top=44 right=61 bottom=258
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: prefix
-- part 31 (field)
-- low flags: 00
-- high flags: 0002
-- rect: left=157 top=313 right=331 bottom=479
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: 3-author example
-- part 32 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=415 top=0 right=36 bottom=454
-- title width / last selected line: 0
-- icon id / first selected line: 21060 / 21060
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Help
----- HyperTalk script -----
on mouseUp
global expert
set the lockScreen to true
go to card "Format-Help" of "Reference Frame"
if expert is not true then show card field "Format-Help"
end mouseUp
-- part 33 (field)
-- low flags: 00
-- high flags: 0002
-- rect: left=434 top=44 right=61 bottom=450
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: # blank lines
-- part contents for card part 5
----- text -----
2
-- part contents for card part 14
----- text -----
1
-- part contents for card part 15
----- text -----
3
-- part contents for card part 16
----- text -----
4
-- part contents for card part 18
----- text -----
5
-- part contents for card part 19
----- text -----
6
-- part contents for card part 20
----- text -----
7
-- part contents for card part 21
----- text -----
, {\it
-- part contents for card part 31
----- text -----
Last, First, First Last, and First Last
-- part contents for card part 22
----- text -----
,
-- part contents for card part 23
----- text -----
,
-- part contents for card part 24
----- text -----
,}
-- part contents for card part 26
----- text -----
--
-- part contents for card part 27
----- text -----
,
-- part contents for card part 28
----- text -----
.
-- part contents for card part 33
----- text -----
1